package io.renren.modules.demo.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.renren.common.service.impl.CrudServiceImpl;
import io.renren.modules.demo.dao.BusLogisticsDao;
import io.renren.modules.demo.dto.BusLogisticsDTO;
import io.renren.modules.demo.entity.BusLogisticsEntity;
import io.renren.modules.demo.service.BusLogisticsService;
import cn.hutool.core.util.StrUtil;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 物流信息管理
 *
 * @author Mark sunlightcs@gmail.com
 * @since 1.0.0 2024-04-28
 */
@Service
public class BusLogisticsServiceImpl extends CrudServiceImpl<BusLogisticsDao, BusLogisticsEntity, BusLogisticsDTO> implements BusLogisticsService {

    @Override
    public QueryWrapper<BusLogisticsEntity> getWrapper(Map<String, Object> params){
        String id = (String)params.get("id");
        String name = (String)params.get("name");

        QueryWrapper<BusLogisticsEntity> wrapper = new QueryWrapper<>();
        wrapper.eq(StrUtil.isNotBlank(id), "id", id);
        wrapper.eq(StrUtil.isNotBlank(name), "name", name);

        return wrapper;
    }

    @Override
    public BusLogisticsEntity selectByName(String name) {
        return null;
    }
}